﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WpfDrawing
{
    /// <summary>
    /// Windowbarchart.xaml 的交互逻辑
    /// </summary>
    public partial class Windowbarchart : Window
    {
        public Windowbarchart()
        {
            InitializeComponent();



        }

        public List<BarChartItem> Items
        {
            get {
                return new List<BarChartItem>()
                {
                    new BarChartItem(){name="陈傻傻",money=3500,year=2012 },
                    new BarChartItem(){name="陈傻傻",money=4300,year=2013  },
                    new BarChartItem(){name="陈傻傻",money=5100,year=2014  },
                    new BarChartItem(){name="陈傻傻",money=6000,year=2015  },
                    new BarChartItem(){name="陈傻傻",money=4600,year=2016 },
                    new BarChartItem(){name="陈傻傻",money=5700,year=2017  },
                    new BarChartItem(){name="陈傻傻",money=6000,year=2018  }

                };
            }
        }


        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //bar.ItemSource = new List<BarChartItem>()
            //{
            //    new BarChartItem(){name="陈傻傻",money=130 },
            //    new BarChartItem(){name="陈傻傻",money=230 },
            //    new BarChartItem(){name="陈傻傻",money=250 },
            //    new BarChartItem(){name="陈傻傻",money=400 }
            //};
        }
    }
}
